Skip to content

Conversation

@eileencodes
Copy link
Member

This bumps the gem to Rails 5. Because of Rails and Rack requirements we need to run on Ruby 2.2.0. Additionally changes required by Rails 5 will not work on older versions of Rails so to deal with that I've done what we did with other apps, bump to the next major version and will be making a 1-0-stable version of the branch for changes needed pre Rails 5.

  • I've fixed all the deprecation warnings
  • Set the Ruby version for travis to 2.2.2
  • Set travis to run on the new infra
  • Fixed a failing test from changes made to parameters.

@eileencodes eileencodes force-pushed the upgrade-to-rails-5 branch 2 times, most recently from 98c4126 to b6c484c Compare January 30, 2016 15:19
This sets the dependency to allow Rails 5.

In upgrading to Rails 5 we require Ruby 2 and changes that are made here
will not work on older versions of Rails. Because of that I'm bumping
the version to 2.0.0.
`before_filter` is now `before_action`. I've changed this to remove the
deprecation warning.
`render text:` is no longer a valid way to render just text content. The
correct way is to use `render plain:`. `render text:` is deprecated.
Rails now requires kwargs in test requests. This sets `params`,
`format`, and `headers` accordingly to fix the deprecation warning.
`render nothing:` is deprecated. If you want nothing rendered you should
use `head :ok`.
In rails/rails@394b7be parameters set were changed to query strings to
behave more like a real browser. In a browser the parameters `false`
will never get sent as `false` and will always be `"false"`. Because
of this change the test for passing `false` into this `Proc` was
failing. We need to change it to check if the layout is not false rather
than relying on the value in the parameters.
`assigns` was removed from Rails and using `instance_variable_get` is
the new correct way to assign an instance variable in tests.
Rack and Rails require Ruby 2.2.2 so we need to upgrade travis to use
only Ruby 2.2.2 and set the minimum version in the gemspec.

This means we'll have to split this peripheral gem into 2 releases. One
for the 4 apps and one for the 5 apps because the changes required by
Rails 5 won't work on older version.
@pschambacher
Copy link

👍 I hope that this gem keeps existing for Rails 5

gem.license = 'MIT'

gem.add_dependency 'actionpack', '>= 4.0.0', '< 5.0'
gem.add_dependency 'actionpack', '~> 5.x'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything about this patch that precludes using this gem with Rails 4?

If not, I’d suggest changing this constraint to:

gem.add_dependency 'actionpack', '>= 4', '< 5.1'

or

gem.add_dependency 'actionpack', '>= 4', '< 6'

@allenwyma
Copy link

any plans to merge this in?

- 2.2.2
gemfile:
- Gemfile
- gemfiles/Gemfile-edge

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edge will soon be 5.1, so we should have a 5.0 gemfile

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, edge is in allow-failures group
so a Gemfile-5-0-stable file should really be added

@jcabas
Copy link

jcabas commented Aug 19, 2016

Somebody please, think of the devs

@rafaelfranca
Copy link
Member

Somebody please, think on the open source maintainers that also have their lives turbolinks/turbolinks#124 (comment)

pixeltrix added a commit that referenced this pull request Nov 12, 2016
@pixeltrix
Copy link
Contributor

Manually merged into master in 309b429

@pixeltrix pixeltrix closed this Nov 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

8 participants